package org.example.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;
import org.example.domain.BookContent;
import org.example.domain.Help;
import org.example.domain.HelpInfo;

@Mapper
public interface HelpInfoDao extends BaseMapper<HelpInfo> {
//    @Insert("insert into help_info(help_info_id,question,answer) values (#{helpInfoId},#{question},#{answer}) where help_id=#{helpId}")
    @Insert("insert into help_info(question,answer,help_id) values (#{question},#{answer},#{helpId})")
    int infoInsert(HelpInfo helpInfo);
    @Update("update help_info set question=#{question},answer=#{answer} where id=#{helpInfoId}")
    int updateByHelpId(HelpInfo helpInfo);
    @Delete("delete from help_info where help_id=#{helpId}")
    int deleteHelpInfoByHelpId(Integer helpId);
    @Select("select * from help_info where id=#{helpInfoId}")
    HelpInfo getHelpInfoId(Integer helpInfoId);


}
